Sea of nodes
a graph representation of SSA representation of a program that combines data flow and control flow, and relaxes the control flow from a total order to a partial order, keeping only the orderings required by data flow.
used as an IR in HotSpot, GraalVM, and V8's TurboFan JIT compiler.
Turbofan IR
allows dead code elimination and constant propagation to be done together, which allows both optimizations to apply more often.
Cliff Clickが博士論文で提唱
例
code:Javascript
while(arg < 10) {
arg = arg + 1;
if (arg == 5)
continue;
if (arg == 6)
break;
}
return arg;
https://scrapbox.io/files/66779f0db298a0001d87acd5.svg
最適化の一例(Global value numbering)
(最適化前)
丸・黒矢印がデータの依存グラフ 四角・赤矢印は制御フローの依存グラフ
https://scrapbox.io/files/667785025505ec001ce5d926.svg
最適化後
https://scrapbox.io/files/6677850ad20d9c001dc05a9c.svg
チュートリアル